package 练习09_多线程处理数组;

import java.lang.reflect.Array;
import java.util.Random;
import java.util.concurrent.*;

/**
 * @ClassName: poolHandle
 * @Author: AllenSun
 * @Date: 2023/3/7 下午2:18
 */
public class poolHandle {
    private static ThreadPoolExecutor executor01 = new ThreadPoolExecutor(0,10,300L, TimeUnit.SECONDS,
            new LinkedBlockingQueue<>(),new ThreadPoolExecutor.CallerRunsPolicy());

    private static ExecutorService executor02 = Executors.newFixedThreadPool(10);
    private static ExecutorService executor03 = Executors.newSingleThreadExecutor();
    private static ExecutorService executor04 = Executors.newCachedThreadPool();

    public static void main(String[] args) {
        Random random = new Random();

        int[] is = new int[20];
        for (int i = 0; i < is.length; i++) {
            // 产生的随机数就是0-99
            int index = random.nextInt(100);
            is[i] = index;
        }


    }

    private String showResult(Array array) {
        return "";
    }


}
